subroutine r2abij_t2efij_iefab3_ri(r2, t2, &
              rivv, rivv2, icore, fact)
!
use mod_ri
use mod_size
use mod_iop
use mod_orbit
use mod_ioff 
use mod_symm
implicit none
!
real*8, intent(in) :: fact
real*4, intent(in) :: r2(*)
real*4, intent(in) :: rivv(*), rivv2(*)
!
real*4, intent(inout) :: t2(*), icore(*)
!
integer :: i, j, a, b, nsize, i0, i1, i2, i3, i4, i5, i6, i7
integer :: c, d, iin1, iin2, iout1, iout2, iout3, iout4
integer, external :: idsymsoc
character*8 file1, file2
real*8, external :: nrm2so
!this is to do r2 = r2 + 0.5*t2(efij)*iefab
i0 = 1                  ! t+
i1 = i0 + nvvoo*isd     ! t-
i2 = i1 + nvvoo*isd     ! tmp+
i3 = i2 + nvvoo*isd     ! tmp-
i4 = i3 + nvvoo*isd     ! itmp 
i5 = i4 + nvvoo*isd     ! icore 
! t-
!--------  t2*abcd
call VmnpqVmnrs_to_Vpqrs_ri_in(t2, icore(i2), 1, 1, vrta, vrta, 1, &
                popa, popa, 1, vrta, vrta, 1, icore(i1), 1, 1.d0, 0.d0, &
                rivv, rivv2) 
call itranspso(icore(i1), icore(i2), popa, popa, 1, vrta, vrta, 1, 1) 
nsize = idsymsoc(1, vrta, vrta, 1, popa, popa, 1)
write(6,*)'norm of test abcd 3', nrm2so(nsize, icore(i2), 1)
!
call axpyso(nioi32, fact*2.d0, icore(i2), 1, r2(ioi3(2)), 1)
return
end
